<?php declare(strict_types=1);

namespace App\Rpc\Service;

use App\Rpc\Lib\OrderInterface;
use Exception;
use RuntimeException;
use Swoft\Co;
use Swoft\Rpc\Server\Annotation\Mapping\Service;
use App\Model\Entity\Emp;

/**
 * Class OrderService
 *
 * @since 1.0
 *
 * @Service(version="1.0")
 */

class OrderService implements OrderInterface
{	

	public function orderlist(int $userId):array
	{
		return ['order_code'=>'tb123','time'=>'2020-09-01'];
	}

	public function get(int $userId):string
	{
		return 'xz182';
	}

	public function sqldata(string $ename):object
	{
		$data = Emp::where(['ename'=>$ename])->get();
		return $data;
	}
}